A conventional pet fence used between the driver seat 52 and the front passenger seat 53 of a vehicle 50 is shown in FIGS. 1 and 2 and generally includes two first bars 60 and each of which has an open top and a leg portion 600 located opposite to the open top and extending outward. A second bar 70 is located between the two first bars 60 and two transverse bar 80 are used to connect the first bars 60 and the second bar 70 together. The second bar 70 includes an open top. An E-shaped top portion 90 includes three extensions which are respectively inserted in the three open tops of the first bars 60 and the second bar 70. The top portion 90 can be extended upward to close the opening between the two seats 52, 53 and the ceiling 51 of the vehicle 50. The two leg portions 600 stand on the floor of the vehicle 50. Two ropes 601 tie the two first bars 60 and the head-rest support rods 521, 531 extending from the two seats 52, 53. The conventional pet fence cannot be positioned securely and often falls and shakes by impact from the pets on the back-seat area.
The present invention intends to provide a pet fence that includes a ceiling member which is retractably connected to the second bar and the ceiling member includes a large-area disk to contact against the ceiling so as to provide the pet fence a better positioning feature.